[jQuery] Any HTML tags inside of tooltip cause basic tooltip to close on hover.

Posted by Christian on Stack Overflow See other posts from Stack Overflow or by Christian
Published on 2010-05-16T22:58:36Z Indexed on 2010/05/16 23:00 UTC
Read the original article Hit count: 172

Filed under:
|
|
|
|

Hi.

I'm new to jQuery, in fact any kind of AJAX / JavsScript (although not new to PHP, xHTML and CSS). Anyway I'm trying to achieve a "tooltip-like" effect, where I can hover over a div...the new div fades in above it and then when I exit the div the "tooltip" fades out.

So here's the basic jQuery I've managed to scrap together reading the odd guide here and there:

$(function()
{
    $('#sn-not-logged-in').hover(function()
    {
        $('#sn-not-logged-in-hover').fadeIn('medium');
    });

    $('#sn-not-logged-in-hover').mouseout(function()
    {
        $('#sn-not-logged-in-hover').fadeOut('medium');
    });

});

Problem is if I put "any" html tag inside the div that hovers in, the second you roll over it the div fades back out.

Any ideas how this can be fixed?

Cheers.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about tooltip